package com.googlecode.chios.jnet.handler;

import java.nio.ByteBuffer;

import com.googlecode.chios.jnet.io.Session;

public class WriteTask implements Task {
	
	private Session session;
	
	private byte[] bytes;

	public WriteTask(Session session, byte[] bytes) {
		this.session = session;
		this.bytes = bytes;
	}

	@Override
	public void run() {
		session.channel().write(ByteBuffer.wrap(bytes));
	}
	
}
